﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Greatest of five numbers</title>
    <link href="styles/js-console.css" rel="stylesheet" />
</head>
<body>
    <div id="js-console"></div>
	<script src="scripts/js-console.js"></script>

    <script>
        var firstNumber = 4;
        var secondNumber = 1;
        var thirdNumber =7;
        var forthNumber = 0;
        var fifthNumber =12;
        var biggestNumber=0;

        if (firstNumber>secondNumber && firstNumber>thirdNumber && 
            firstNumber > forthNumber && firstNumber > fifthNumber) {

            biggestNumber = firstNumber;
        }
        else if (secondNumber>firstNumber && secondNumber>thirdNumber 
            && secondNumber > forthNumber && secondNumber > fifthNumber) {
        
            biggestNumber = secondNumber;
        }
        else if (thirdNumber>firstNumber && thirdNumber>secondNumber 
            && thirdNumber > forthNumber && thirdNumber > fifthNumber) {
        
            biggestNumber = thirdNumber;
        }
        else if (forthNumber>firstNumber && forthNumber>secondNumber 
            && forthNumber > thirdNumber && forthNumber > fifthNumber) {
        
            biggestNumber = forthNumber;
        }
        else {
        
            biggestNumber = fifthNumber;
        }
        jsConsole.writeLine(biggestNumber);
    </script>
</body>
</html>
